package com.wteam.dragon.system.aop.log.controller.service;

import com.wteam.dragon.system.aop.log.controller.pojo.bean.Log;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author 陈晓辉
 * @Date 2020/4/1 23:57
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public interface LogService{

    /**
     * 新增日志
     * @param username 账号名
     * @param browser 浏览器名
     * @param ip ip地址
     * @param joinPoint 连接类信息
     * @param log 日志
     */
    @Transactional(rollbackFor = Exception.class)
    void addLog(String username, String browser, String ip, ProceedingJoinPoint joinPoint, Log log);
}
